<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick="closeDialog(false)">无参关闭</button>
<button onclick="closeDialog(true)">带参关闭</button>
<button onclick="callback()">单纯回调</button>
<script src="../hades_dialog.js"></script>
<script>
    if (window.self == window.top) {
        window._dialog = new Dialog();
    } else {
        window._dialog = window.top._dialog;
    }

    function closeDialog(bool) {
        if (bool) {
            _dialog.close('test', {a: '带参关闭，同时触发回调'});
        } else {
            _dialog.close('test');
        }

    }

    function callback() {
        _dialog.callback('test', {a: '单纯触发回调'});
    }

</script>
</body>
</html>
